package com.designpatterns.command.command.ceiling;

import com.designpatterns.command.command.Command;
import com.designpatterns.command.entity.CeilingFan;

/**
 * @author Brook
 */
public class CeilingFanOffCommand implements Command {
    CeilingFan ceilingFan;

    public CeilingFanOffCommand(CeilingFan ceilingFan) {
        this.ceilingFan = ceilingFan;
    }

    @Override
    public void excute() {
        ceilingFan.off();
    }

    @Override
    public void undo() {
        ceilingFan.on();
    }


}
